package com.baizhi.controller;

import com.baizhi.entity.Album;
import com.baizhi.service.AlbumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/album")
public class AlbumController {
    @Autowired(required = false)
    private AlbumService albumService;

    @RequestMapping("/selectAll")
    public Map selectAll(int page,int limit,String albumName){
        return albumService.selectAll(page, limit, albumName);
    }


    @RequestMapping("/selectOne")
    public Album selectOne(int id){
        return albumService.selectOne(id);
    }

}
